package com.yuju.enums;
/**
 * 
 * 类名：ChangePasswordReturnCodeEnum  <br />
 *
 * 功能：忘记密码
 *
 * @author : zhousc <br />
 * @Date : 2018年1月8日 上午11:19:51  <br />
 * @version : 1.1 <br />
 */
public enum ChangePasswordReturnCodeEnum {
	PASSWORD_MISMATCH("yuju-changePassword-1000", "两次输入的密码不一致"),
	CHANGEPASSWORD_SUCCESS("yuju-changePassword-1001", "密码更新成功"),
	CHANGEPASSWORD_FAILURE("yuju-changePassword-1002", "密码更新成功"),
	NOT_REGISTERED("yuju-changePassword-1001", "手机号未注册");

	
	private String code;
	private String desc;
	
	ChangePasswordReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (ChangePasswordReturnCodeEnum enume : ChangePasswordReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}